package com.collect.zambia.zhiAdater.zhiLevelDetail;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.collect.zambia.R;
import com.collect.zambia.zhiBean.zhiReceive.ZHIRCustomerPerformanceEntity;

public class ZHILevelDetailCustomer extends BaseQuickAdapter<ZHIRCustomerPerformanceEntity, BaseViewHolder> {

    public ZHILevelDetailCustomer() {
        super(R.layout.item_level_detail_customer_list, null);
    }

    @Override
    protected void convert(BaseViewHolder helper, ZHIRCustomerPerformanceEntity item) {
        helper.setText(R.id.tv_detail_case_date, item.getAssignDateFormatDisplay());
        helper.setText(R.id.tv_detail_case_repay_date, item.getRepayDateFormatDisplay());
        helper.setText(R.id.tv_detail_case_num, item.getAssignNumFormatInt()+"");
        helper.setText(R.id.tv_detail_case_settle, item.getRepayNumFormatInt()+"");
        helper.setText(R.id.tv_detail_case_rate, item.getRepayRateFormat());
        helper.setText(R.id.tv_detail_case_weekend, item.getAddRepayNum());

        boolean isHighLightFlag = item.isHighLightFlag();
        int highLightColor = mContext.getResources().getColor(R.color.theme_green_0);
        int norColor = mContext.getResources().getColor(R.color.theme_black_12);
        int curColor = isHighLightFlag ? highLightColor : norColor;

        helper.setTextColor(R.id.tv_detail_case_date, curColor);
        helper.setTextColor(R.id.tv_detail_case_repay_date, curColor);
        helper.setTextColor(R.id.tv_detail_case_num, curColor);
        helper.setTextColor(R.id.tv_detail_case_settle, curColor);
        helper.setTextColor(R.id.tv_detail_case_rate, curColor);
        helper.setTextColor(R.id.tv_detail_case_weekend, curColor);

    }
}
